其他
happy thanks giving
网上找了一个数据,记录了在固定位置上填充颜色,可以画出火鸡:
> head(Turkey)
Happy Thanksgiving Turkey.Colors
1 1 -7 yellow
2 1 -8 yellow
3 1 -9 red
4 1 -10 red
5 1 -11 darkorange4
6 1 -12 darkorange4
用了geom_tile来画,代码很简单,这里用了ggtree提供的subview函数,读个图,把它插入到原图上面,所谓图上嵌图,把公众号的logo给画上去。
> library(ggtree)
> Turkey <- read.csv("http://pages.iu.edu/~cdesante/turkey.csv")
> ggplot(Turkey, aes(Happy, Thanksgiving, fill=Turkey.Colors)) + geom_tile() +
+ scale_fill_identity() + theme_void() + ggtitle("Happy Thanks giving from biobabble") -> p
> subview(p, "~/Desktop/gc.png", x=10, y=0, width=.3, height=.3) + ylim(NA, 1)